<style lang="less" scoped src="./classes.less"></style>
<style lang="less" scoped src="../public.less"></style>
<script src="./classes.js"></script>
<template>
    <div>
        <div class="main-table" style="font-size: 15px;">
            <Row align="middle">
                <Col span="2">
                    班级名称:
                </Col>
                <Col span="4">
                    <Input v-model="query.name" style="width: 98%"></Input>
                </Col>
                <Col span="1">
                    学年:
                </Col>
                <Col span="2">
                    <Select v-model="query.year">
                        <Option value='2016'>2016</Option>
                        <Option value='2017'>2017</Option>
                        <Option value='2018'>2018</Option>
                    </Select>
                </Col>
                <Col span="1">
                    学期:
                </Col>
                <Col span="2">
                    <Select v-model="query.classSeason">
                        <Option v-for="item in classSeasonList" :value="item.id">{{item.name}}</Option>
                    </Select>
                </Col>
            </Row>
            <Row align="middle" style="margin-top: 10px;">
                <Col span="2">
                    所属校区:
                </Col>
                <Col span="4">
                    <Select v-model="query.classAreaId">
                        <Option v-for="item in areaList" :value="item.id" :key="item.id">{{item.name}}</Option>
                    </Select>
                </Col>
                <Col span="1">
                    部门:
                </Col>
                <Col span="2">
                    <Input v-model="query.departmentName" :readonly="true" @on-click="deptModal = true"
                           icon="search"></Input>
                </Col>
                <Col span="1">
                    专业大类:
                </Col>
                <Col span="2">
                    <Select v-model="query.marjorId">
                        <Option v-for="item in marjorFatherList" :value="item.id">{{item.name}}</Option>
                    </Select>
                </Col>
            </Row>
        </div>
        <div style="display: flex;justify-content:space-between;margin-top: 10px;">
            <div>
                <span @click="showAdd"><Button type="primary" icon="plus">开班申请</Button></span>
                <span @click="doSubmitApproveBath"><Button type="success" icon="clipboard">送审</Button></span>
                <span @click="doDelBath"><Button type="error" icon="close">批量删除</Button></span>
                <!--  <span @click="showAdd"><Button type="primary" icon="edit">修改</Button></span>
                  <span @click=""><Button type="primary" icon="close">删除</Button></span> -->
            </div>
            <div>
                <span @click="doQuery"><Button type="primary" icon="android-search">查询</Button></span>
                <span @click="query={};doQuery();"><Button type="primary" icon="refresh">重置</Button></span>
            </div>
        </div>
        <div class="main-table">
            <Table border :columns="columns" :data="dataList" :highlight-row="true"
                   @on-selection-change="whenSelectRow"></Table>
        </div>
        <div class="pagination">
            <Page border :total="total" size="small" :page-size="pageSize" :current.sync="pageIndex" @on-change="init"
                  show-total show-elevator></Page>
        </div>

        <Modal
                v-model="addVisible"
                width="80%"
                :loading="true"
                :draggable="true"
                :closable="true" title="开班申请" :mask-closable="false"
                >
            <Form :label-width="80" :model="formData" :rules="formDataRules" ref="formData">
                <Row>
                    <Col span="12">
                        <FormItem label="班级名称:" prop="name">
                            <Input type="text" v-model="formData.name"></Input>
                        </FormItem>
                    </Col>
                    <Col span="12">
                        <FormItem label="班级代码:" prop="code">
                            <Input type="text" v-model="formData.classCode"></Input>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="24">
                        <FormItem label="课次:" prop="classTimeJson">
                            <Button type="primary" style="margin-left: 10px" @click="classTimeVisible=true" icon="plus">
                                添加课次
                            </Button>
                            <span style="margin-left:5px;">
                            <Tag v-for="item in classTimeList" :key="item.id" :name="item" closable
                                 @on-close="whenCloseClassTime">{{item.name}}({{item.times}}节)({{item.price}}元)</Tag>
                            </span>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="12">
                        <FormItem label="每课次课时数(分钟):">
                            <Input type="text" v-model="formData.classTime"></Input>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="12">
                        <FormItem label="学年:" prop="classYear">
                            <Select v-model="formData.classYear">
                                <Option value='2016'>2016</Option>
                                <Option value='2017'>2017</Option>
                                <Option value='2018'>2018</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="12">
                        <FormItem label="学期:">
                            <Select v-model="formData.classSeason">
                                <Option v-for="item in classSeasonList" :value="item.id" :key="item.id">{{item.name}}
                                </Option>
                            </Select>
                        </FormItem>
                    </Col>
                </Row>
                <Row>
                    <Col span="12">
                        <FormItem label="校区:" prop="classAreaId" >
                            <Select v-model="formData.classAreaId"  >
                                <Option v-for="item in areaList" :value="item.id" :key="item.id">{{item.name}}</Option>
                            </Select>
                        </FormItem>
                    </Col>
                    <Col span="12">
                        <FormItem label="部门:" prop="departmentId">
                            <Select v-model="formData.departmentId" >
                                <Option v-for="item in departmentList" :value="item.id" :key="item.id">{{item.name}}
                                </Option>
                            </Select>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="12">
                        <FormItem label="专业:" prop="marjorName">
                            <Input v-model="formData.marjorName" :readonly="true" icon="search"
                                   @on-click="whenTapMarjor"></Input>
                        </FormItem>
                    </Col>
                    <Col span="12">
                        <FormItem label="专业程度:" prop="code">
                            <Select v-model="formData.marjorLevelId">
                                <Option v-for="item in majorLevelList" :value="item.id" :key="item.id">{{item.name}}
                                </Option>
                            </Select>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="12">
                            <FormItem label="负责教师:" prop="mainTeacherName">
                            <Input v-model="formData.mainTeacherName" :readonly="true" icon="search"
                                   @on-click="selectMainTeacher"></Input>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                <Col span="24">
                    <FormItem label="课表信息:" prop="classScheduleJson">
                        <Button type="primary" style="margin-left: 10px" @click="showClassSchedule" icon="plus">设置课表
                        </Button>
                        <span style="margin-left:5px;">
                            <Tag v-for="item in dataListSchedule" :key="item.id" :name="item"
                                 :closable="tagCloseableFlag" @on-close="whenCloseTag">{{item.classTimeName}}  {{item.startTime}}-{{item.endTime}} {{item.classRoom}}</Tag>
                            </span>
                    </FormItem>
                </Col>
            </Row>

                <Row>
                    <Col span="24">
                        <FormItem label="课表模版:">
                                <Row>
                                    <Col span="8">
                                        <RadioGroup type="button" v-model="classTimeModelTypeEntity" size="small">
                                            <Radio v-for="item in classTimeModelType" :label="item.k" :key="item.k">
                                                <span>{{item.v}}</span>
                                            </Radio>
                                        </RadioGroup>
                                    </Col>

                                    <Col span="8">

                                        <RadioGroup type="button" v-model="classTimeModelWeekEntity" size="small">
                                            <Radio v-for="item in classTimeModelWeek" :label="item.k" :key="item.k">
                                                <span>{{item.v}}</span>
                                            </Radio>
                                        </RadioGroup>
                                    </Col>

                                    <Col span="4">
                                        <Input v-model="classTimeModelClassRoomName" :readonly="true" icon="search"
                                               @on-click="showClassRoomSelecterForClassTimeModel"></Input>
                                    </Col>

                                    <Col span="4">
                                        <Button  type="primary" style="margin-left: 5px" @click="addModelToScheduleList" icon="plus" size="small">
                                        </Button>

                                        <Button  type="primary" style="margin-left: 5px" icon="refresh" size="small" @click="refreshClassTimeMolde">
                                        </Button>
                                    </Col>
                                </Row>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="19">
                        <FormItem prop="classTimeRemarks">
                            <Input type="text" v-model="formData.classTimeRemarks"></Input>
                        </FormItem>

                    </Col>

                    <Col span="5">
                        <span> (上课时间另行通知的请填写，且不设课表)</span>
                    </Col>
                </Row>

                <Row>
                    <Col span="24">
                        <FormItem label="教材:" prop="">
                            <Button type="primary" style="margin-left: 10px" @click="booksVisible=true" icon="plus">添加教材
                            </Button>
                            <span style="margin-left:5px;">
                            <Tag v-for="item in bookList" :key="item.id" :name="item" closable
                                 @on-close="whenDelBooks">{{item.name}}({{item.price}}元)</Tag>
                            </span>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="24">
                        <FormItem label="班级描述:">
                            <Input type="textarea" :rows="2" v-model="formData.classRemark"></Input>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="12">
                        <FormItem label="开课时间:">
                            <DatePicker type="date" v-model="formData.classStarttime" style="width:100%" confirm></DatePicker>
                        </FormItem>
                    </Col>
                    <Col span="12">
                        <FormItem label="结课时间:">
                            <DatePicker type="date"  v-model="formData.classEndtime" style="width:100%" confirm></DatePicker>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="12">
                        <FormItem label="预招人数:" prop="initiallyPeople">
                            <Input v-model="formData.initiallyPeople"></Input>
                        </FormItem>
                    </Col>
                    <Col span="12">
                        <FormItem label="预留人数:" prop="reservedPeople">
                            <Input v-model="formData.reservedPeople" ></Input>
                        </FormItem>
                    </Col>
                </Row>
                <Row>
                    <Col span="12">
                        <FormItem label="教学费(单节课价格):" prop="teachCost">
                            <Input v-model="formData.teachCost" ></Input>
                        </FormItem>
                    </Col>
                    <Col span="12">
                        <FormItem label="教材费:">
                            <Input v-model="formData.otherCost" :readonly="true"></Input>
                        </FormItem>
                    </Col>
                </Row>

                <Row>
                    <Col span="12">
                        <FormItem label="教学费差价:">
                            <Input v-model="formData.teachCostDiff" ></Input>
                        </FormItem>
                    </Col>

                    <Col span="12">
                        <FormItem label="录取方式:" >
                            <Select v-model="formData.classApplyType">
                                <Option v-for="item in classApplyList" :value="item.id" :key="item.id">{{item.name}}
                                </Option>
                            </Select>
                        </FormItem>
                    </Col>
                </Row>
                <Row>
                     <Col span="24">
                         <h3 style="color: red">tips：教学费的总价=教学费单价x课次数+教学费差价+教材费</h3>
                     </Col>
                </Row>
            </Form>
            <div slot="footer">
            <Button type="primary" @click="doSave('formData')">保存</Button>
            <Button type="ghost" style="margin-left: 8px" @click="addVisible = false">取消</Button>
            </div>
        </Modal>

        <!--<Modal :loading="true"-->
        <!--width="100%" :closable="true" title="开班申请" fullscreen :mask-closable="false" :draggable="true"-->
        <!--@on-visible-change="whenAddVisibleChange">-->
        <!--<div class="modal-div">-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>班级名称：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.name" :readonly="isRead"></Input>-->
        <!--</Col>-->
        <!--<Col span="4" class="titele">班级代码：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.classCode" :readonly="isRead"></Input>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>课次：</Col>-->
        <!--<Col span="20" class="content-left">-->
        <!--<Button type="primary" style="margin-left: 10px" @click="classTimeVisible=true" icon="plus">-->
        <!--添加课次-->
        <!--</Button>-->
        <!--<span style="margin-left:5px;">-->
        <!--<Tag v-for="item in classTimeList" :key="item.id" :name="item" closable-->
        <!--@on-close="whenCloseClassTime">{{item.name}}({{item.times}}节)</Tag>-->
        <!--</span>-->
        <!--&lt;!&ndash;<Input v-model="formData.classNo"  :readonly="isRead"></Input>&ndash;&gt;-->
        <!--&lt;!&ndash;<Select v-model="formData.classNo">&ndash;&gt;-->
        <!--&lt;!&ndash;<Option v-for="item in classTimeType" :value="item.id" :key="item.id">{{item.name}}({{item.value}}节)</Option>&ndash;&gt;-->
        <!--&lt;!&ndash;</Select>&ndash;&gt;-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele">每课次课时数：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.classTime" :readonly="isRead"></Input>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>学年：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Select v-model="formData.classYear">-->
        <!--<Option value='2016'>2016</Option>-->
        <!--<Option value='2017'>2017</Option>-->
        <!--<Option value='2018'>2018</Option>-->
        <!--</Select>-->
        <!--</Col>-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>学期：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Select v-model="formData.classSeason">-->
        <!--&lt;!&ndash;     <Option :value="2016">秋季</Option>-->
        <!--<Option :value="2017">2017</Option>-->
        <!--<Option :value="2018">2018</Option> &ndash;&gt;-->
        <!--<Option v-for="item in classSeasonList" :value="item.id" :key="item.id">{{item.name}}-->
        <!--</Option>-->
        <!--</Select>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>区域：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Select v-model="formData.classAreaId" @on-open-change="whenSelectDep">-->
        <!--<Option v-for="item in areaList" :value="item.id" :key="item.id">{{item.name}}</Option>-->
        <!--</Select>-->
        <!--</Col>-->
        <!--&lt;!&ndash;<Col span="4" class="titele"><span style="color: red">*</span> 机构：</Col>&ndash;&gt;-->
        <!--&lt;!&ndash;<Col span="4" class="content">&ndash;&gt;-->
        <!--&lt;!&ndash;<Select v-model="formData.orgId" @on-change="whenSelectOrg" disabled>&ndash;&gt;-->
        <!--&lt;!&ndash;<Option v-for="item in orgList" :value="item.id" :key="item.id">{{item.name}}</Option>&ndash;&gt;-->
        <!--&lt;!&ndash;</Select>&ndash;&gt;-->
        <!--&lt;!&ndash;</Col>&ndash;&gt;-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>部门：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Select v-model="formData.departmentId" @on-open-change="whenSelectDep">-->
        <!--<Option v-for="item in departmentList" :value="item.id" :key="item.id">{{item.name}}-->
        <!--</Option>-->
        <!--</Select>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>专业：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.marjorName" :readonly="true" icon="search"-->
        <!--@on-click="whenTapMarjor"></Input>-->
        <!--</Col>-->
        <!--<Col span="4" class="titele">专业程度：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Select v-model="formData.marjorLevelId">-->
        <!--<Option v-for="item in majorLevelList" :value="item.id" :key="item.id">{{item.name}}-->
        <!--</Option>-->
        <!--</Select>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele">负责教师：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--&lt;!&ndash;  <Select v-model="formData.mainTeacherId">-->

        <!--</Select> &ndash;&gt;-->
        <!--<Input v-model="formData.mainTeacherName" :readonly="true" icon="search"-->
        <!--@on-click="selectMainTeacher"></Input>-->
        <!--</Col>-->
        <!--<Col span="4" class="titele">助理教师：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--&lt;!&ndash; <Input v-model="formData.viceTeacherId"  :readonly="true" icon="search"></Input> &ndash;&gt;-->
        <!--<Input v-model="formData.viceTeacherName" :readonly="true" icon="search"-->
        <!--@on-click="selectViceTeacher"></Input>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele">课表信息：</Col>-->
        <!--<Col span="20" class="content-left">-->
        <!--<Button type="primary" style="margin-left: 10px" @click="showClassSchedule" icon="plus">设置课表-->
        <!--</Button>-->
        <!--<span style="margin-left:5px;">-->
        <!--<Tag v-for="item in dataListSchedule" :key="item.id" :name="item.name"-->
        <!--:closable="tagCloseableFlag" @on-close="whenCloseTag">{{item.classTimeName}}  {{item.startTime}}-{{item.endTime}} {{item.classRoom}}</Tag>-->
        <!--</span>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"></Col>-->
        <!--<Col span="20" class="content">-->
        <!--<Input v-model="formData.bulidName" :readonly="isRead"></Input>-->
        <!--(上课时间另行通知的请填写，且不设课表)-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele">选择教材：</Col>-->
        <!--<Col span="20" class="content-left">-->
        <!--<Button type="primary" style="margin-left: 10px" @click="booksVisible=true" icon="plus">添加教材-->
        <!--</Button>-->
        <!--<span style="margin-left:5px;">-->
        <!--<Tag v-for="item in bookList" :key="item.id" :name="item" closable-->
        <!--@on-close="whenDelBooks">{{item.name}}</Tag>-->
        <!--</span>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele">班级描述：</Col>-->
        <!--<Col span="20" class="content">-->
        <!--<Input type="textarea" :rows="2" v-model="formData.classRemark" :clearable="!isRead"-->
        <!--:readonly="isRead"></Input>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>开课时间：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<DatePicker type="date" v-model="formData.classStarttime" style="width:100%"></DatePicker>-->
        <!--</Col>-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>结课时间：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<DatePicker type="date" v-model="formData.classEndtime" style="width:100%"></DatePicker>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>预招人数：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.initiallyPeople" :readonly="isRead"></Input>-->
        <!--</Col>-->
        <!--<Col span="4" class="titele">预留人数：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.reservedPeople" :readonly="isRead"></Input>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>教学费（每课时/元）：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.teachCost" :readonly="isRead"></Input>-->
        <!--</Col>-->
        <!--<Col span="4" class="titele">教材费（元）：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Input v-model="formData.otherCost" :readonly="true"></Input>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--&lt;!&ndash;<Row class="table-Row">&ndash;&gt;-->
        <!--&lt;!&ndash;<Col span="4" class="titele">服装费：</Col>&ndash;&gt;-->
        <!--&lt;!&ndash;<Col span="8" class="content">&ndash;&gt;-->
        <!--&lt;!&ndash;<Input v-model="formData.clothingCost"  :readonly="isRead"></Input>&ndash;&gt;-->
        <!--&lt;!&ndash;</Col>&ndash;&gt;-->
        <!--&lt;!&ndash;<Col span="4" class="titele">材料费：</Col>&ndash;&gt;-->
        <!--&lt;!&ndash;<Col span="8" class="content">&ndash;&gt;-->
        <!--&lt;!&ndash;<Input v-model="formData.materialsCost"  :readonly="isRead"></Input>&ndash;&gt;-->
        <!--&lt;!&ndash;</Col>&ndash;&gt;-->
        <!--&lt;!&ndash;</Row>&ndash;&gt;-->
        <!--<Row class="table-Row">-->
        <!--<Col span="4" class="titele"><span style="color: red">*</span>录取方式：</Col>-->
        <!--<Col span="8" class="content">-->
        <!--<Select v-model="formData.classApplyType">-->
        <!--<Option v-for="item in classApplyList" :value="item.id" :key="item.id">{{item.name}}-->
        <!--</Option>-->
        <!--</Select>-->
        <!--</Col>-->
        <!--</Row>-->
        <!--</div>-->

        <!--<div slot="footer">-->
        <!--<Button type="primary" @click="doSave">保存</Button>-->
        <!--<Button type="ghost" style="margin-left: 8px" @click="addVisible = false">取消</Button>-->
        <!--</div>-->
        <!--</Modal>-->

        <Modal
                v-model="scheduleVisible" title="设置课表" :mask-closable="false"
                width="60%" >
            <div style="margin-bottom: 10px;">
                <Row align="middle">
                    <Col span="2">
                        <Button @click="addRow(dataListSchedule.length)" icon="plus">添加</Button>
                    </Col>
                    <Col span="2">
                        <Button @click="bathAddClassRoomSchedule" icon="plus">批量添加</Button>
                    </Col>
                </Row>
            </div>
            <Table border :columns="columnsSchedule" :data="dataListSchedule" :highlight-row="true"></Table>
        </Modal>

        <Modal
                v-model="marjorTreeVisible"
                title="选择专业"
                :mask-closable="false"
                @on-ok="whenSetMarjor"
                @on-visible-change="whenSetMarjor"
        >
            <Tree :data="marjorList" @on-select-change="whenSelectMarjor"></Tree>
        </Modal>


        <Modal
                v-model="teachersVisible"
                title="选择教师" width="50%"
                :mask-closable="false">
            <div class="main-table" style="margin-bottom: 10px;">
                <Row>
                    <Col span="3">教师名称:</Col>
                    <Col span="6">
                        <Input v-model="teacherQueryData.name" :readonly="isRead"></Input>
                    </Col>
                    <Col span="2" push="1">职称:</Col>
                    <Col span="4" push="1">
                        <Select v-model="teacherQueryData.technicalid">
                            <Option v-for="item in positionList" :value="item.id" :key="item.id">{{item.name}}</Option>
                        </Select>
                    </Col>
                    <Col span="4" push="2"><span @click="doTeacherQuery"><Button type="primary"
                                                                                 icon="android-search">查询</Button></span>
                    </Col>
                </Row>
            </div>
            <Table border highlight-row :columns="columnsTeachers" :data="dataListTeachers" :highlight-row="true"
                   @on-selection-change="whenTeacherSelected" @on-current-change="whenTeacherChange"></Table>
            <div class="pagination">
                <Page border :total="teacherQueryData.total" size="small" :page-size="teacherQueryData.pageSize"
                      :current.sync="teacherQueryData.pageIndex" @on-change="teacherInit" show-total
                      show-elevator></Page>
            </div>
        </Modal>
        <Modal v-model="deptModal"
               title="部门列表"
               width="20%"
               :mask-closable="false">
            <custom-tree ref="dept"
                         url="/base/organize/findOrgAll"
                         :formData="{'orgid': baseuser.orgId}"
                         :showCheckbox="false"></custom-tree>
            <div slot="footer">
                <Button type="primary" @click="setDept">确认</Button>
                <Button type="error" style="margin-left: 8px" @click="cancelSelect">清空</Button>
            </div>
        </Modal>

        <Modal v-model="bathAddClassRoomScheduleVisible"
               title="批量设置课表"
               width="50%"
               :mask-closable="false">
            <Form :label-width="80">
                    <FormItem label="上课周期:">
                        <Checkbox-group @on-change="bathAddClassOnChange" :label-in-value="true"
                        v-model="bathAddClassRoomData.classTime" size="large"
                        style="margin-left: 10px;">
                        <Checkbox v-for="(item,key) in weekData" :key="key" :label="item.id">
                        <span>{{item.name}}</span>
                        </Checkbox>
                        </Checkbox-group>
                    </FormItem>

                    <FormItem label="教室:">
                        <Input v-model="bathAddClassRoomData.classRoomName" :readonly="true" icon="search"
                        @on-click="showClassRoomSelecter"></Input>
                    </FormItem>

                <FormItem label="开始时间:">
                    <TimePicker format="HH:mm" type="time" style="width: 168px;margin-left: 10px;"
                    @on-change="whenBathClassStartTimeChange"></TimePicker>
                </FormItem>

                <FormItem label="结束时间:">
                    <TimePicker format="HH:mm" type="time" style="width: 168px;margin-left: 10px;"
                    @on-change="whenBathClassEndTimeChange"></TimePicker>
                </FormItem>
            </Form>
            <!--<div class="main-table" style="margin-bottom: 10px;">-->
                <!--<Row class="table-Row">-->
                    <!--<Col span="4" class="titele">上课周期：</Col>-->
                    <!--<Col span="20" class="content-left">-->
                        <!--<Checkbox-group @on-change="bathAddClassOnChange" :label-in-value="true"-->
                                        <!--v-model="bathAddClassRoomData.classTime" size="large"-->
                                        <!--style="margin-left: 10px;">-->
                            <!--<Checkbox v-for="(item,key) in weekData" :key="key" :label="item.id">-->
                                <!--<span>{{item.name}}</span>-->
                            <!--</Checkbox>-->
                        <!--</Checkbox-group>-->
                    <!--</Col>-->
                <!--</Row>-->
                <!--<Row class="table-Row">-->
                    <!--<Col span="4" class="titele">教室：</Col>-->
                    <!--<Col span="20" class="content">-->
                        <!--<Input v-model="bathAddClassRoomData.classRoomName" :readonly="true" icon="search"-->
                               <!--@on-click="showClassRoomSelecter"></Input>-->
                    <!--</Col>-->
                <!--</Row>-->
                <!--<Row class="table-Row">-->
                    <!--<Col span="4" class="titele">开始时间：</Col>-->
                    <!--<Col span="20" class="content-left">-->
                        <!--<TimePicker format="HH:mm" type="time" style="width: 168px;margin-left: 10px;"-->
                                    <!--@on-change="whenBathClassStartTimeChange"></TimePicker>-->
                    <!--</Col>-->
                <!--</Row>-->
                <!--<Row class="table-Row">-->
                    <!--<Col span="4" class="titele">结束时间：</Col>-->
                    <!--<Col span="20" class="content-left">-->
                        <!--<TimePicker format="HH:mm" type="time" style="width: 168px;margin-left: 10px;"-->
                                    <!--@on-change="whenBathClassEndTimeChange"></TimePicker>-->
                    <!--</Col>-->
                <!--</Row>-->
            <!--</div>-->
            <div slot="footer">
                <Button type="primary" @click="bathAddClassRoomConfirm">确认</Button>
                <Button style="margin-left: 8px" @click="bathAddClassRoomScheduleClose">关闭</Button>
            </div>
        </Modal>

        <Modal
                title="选择教室"
                v-model="classRoomVisible"
                width="60%"
                :mask-closable="false"
                @on-ok="whenSetClassRoom"
        >
            <classroomComp ref="classroomComp"></classroomComp>
        </Modal>

        <Modal
                title="选择教材"
                v-model="booksVisible"
                width="80%"
                :mask-closable="false"
                @on-ok="whenSelectBook"
        >
            <books ref="books"></books>
        </Modal>

        <Modal
                title="添加课次 "
                v-model="classTimeVisible"
                :fullscreen="true"
                :mask-closable="false"
                @on-ok="addClassTime"
                :loading="true"
        >
            <Form :label-width="80">
                <FormItem label="名称:">
                    <Input placeholder="请输入课次名称" style="width: 150px" v-model="classTimeData.name"></Input>
                </FormItem>
                <FormItem label="总价(元):">
                    <InputNumber  v-model="classTimeData.price" style="width: 150px;"></InputNumber >
                </FormItem>
                <FormItem label="课次:">
                    <InputNumber placeholder="请输入数字" style="width: 150px" v-model="classTimeData.times"></InputNumber>
                </FormItem>
            </Form>
        </Modal>
    </div>
</template>

